package com.shenhan.single;

/**
 * @Author shenhan
 * @Date: 2020/6/12 23:47
 * @Description:
 */
public enum Single {
    /**
     * instance
     */
    INSTANCE;

    public static Single getInstance() {
        return INSTANCE;
    }
}

class Test{
    public static void main(String[] args) {
        Single instance = Single.getInstance();
        Single instance2 = Single.getInstance();
        System.out.println(instance.getClass());
        System.out.println(instance2.getClass());
    }
}